package pers.vic.widget.automation.baidu.task;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import pers.vic.widget.automation.baidu.service.TiebaSignInService;

/**
 * @author Vic.xu
 * @description: 百度贴吧自动签到
 * @date: 2021/7/12 0012 8:30
 */
@Service
public class BaiduSignInTask {

    @PostConstruct
    public void post() {
        System.out.println("BaiduSignInTask  post  Construct  ");
    }

    @Resource
    private TiebaSignInService tiebaSignInService;

    /**
     * 3小时 /
     */
    public static final long FIXEDDELAY = 3 * 60 * 60 * 1000;

    /** 定时百度贴吧一键签到 */

    @Scheduled(initialDelay = 6000, fixedDelay = FIXEDDELAY)
    public void signIn() {

        tiebaSignInService.signIn();

    }
}
